<!--
 Copyright 2025 Google LLC

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<h2 mat-dialog-title class="new-app-title">Create a new app</h2>

<mat-form-field style="padding-left:20px; padding-right: 24px;">
    <input
      [(ngModel)]="newAppName"
      matInput
      (keydown.enter)="createNewApp()">
      @if (!isNameValid()) {
        <mat-hint class="validation-hint">
        Start with a letter or underscore, and contain only letters, digits, and underscores.
        </mat-hint>
      }
  </mat-form-field>
<mat-dialog-actions align="end">
  <button mat-button mat-dialog-close>Cancel</button>
  <button
    mat-button
    cdkFocusInitial
    (click)="createNewApp()"
    [disabled]="!isNameValid()">
    Create
  </button>
</mat-dialog-actions>
